package org.fly.jingwei.ext.utils;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * @author leo.jie (weixiao.me@aliyun.com)
 * @version 1.0
 * @organization bigdata
 * @website https://www.jielongping.com
 * @date 2020/5/30 11:11 上午
 * @since 1.0
 */
public class ExceptionUtils {
    public static String toString(Exception e) {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        e.printStackTrace(pw);
        return sw.toString();
    }
}
